home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / segal / paint.G < prev    next >
Encoding:
Text File  |  1992-12-24  |  28.4 KB  |  940 lines

  1. ;GIL-3
  2. (
  3. (
  4.     :type                   :menu
  5.     :name                   menu_edit_mask
  6.     :help                   ""
  7.     :columns                1
  8.     :menu-type              :command
  9.     :menu-handler           nil
  10.     :menu-title             "Edit mask"
  11.     :menu-item-labels       ("Cut" "Copy" "Paste" "Undo" "Original" "" "Clear frame" "Clear whole mask" "Fill frame" "Fill whole mask" "Invert frame" "Invert whole mask" )
  12.     :menu-item-label-types  (:string :string :string :string :string :string :string :string :string :string :string :string )
  13.     :menu-item-states       (:active :active :active :active :active :active :active :active :active :active :active :active )
  14.     :menu-item-defaults     (nil nil nil nil nil nil nil nil nil nil nil nil )
  15.     :initial-selections     (nil nil nil nil nil nil nil nil nil nil nil nil )
  16.     :menu-item-handlers     (nil nil nil nil nil nil nil nil nil nil nil nil )
  17.     :menu-item-menus        (nil nil nil nil nil nil nil nil nil nil nil nil )
  18.     :menu-item-colors       ("" "" "" "" "" "" "" "" "" "" "" "" )
  19.     :pinnable               t
  20.     :user-data              ()
  21.     :actions                (
  22.         (
  23.         :from                   (menu_edit_mask "Copy")
  24.         :when                   (Notify )
  25.         :to                     (menu_edit_mask "Copy")
  26.         :function_type          ExecuteCode
  27.         :arg_type               (:string)
  28.         :action                 ("copy_mask(win[WIN_PAINT].m_data[0], bm,
  29.     m[segal.e_m].bit_key, bm_key[win[WIN_PAINT].aspect + 3],
  30.     win[WIN_PAINT].img_size);")
  31.         )
  32.         (
  33.         :from                   (menu_edit_mask "Fill frame")
  34.         :when                   (Notify )
  35.         :to                     (menu_edit_mask "Fill frame")
  36.         :function_type          ExecuteCode
  37.         :arg_type               (:string)
  38.         :action                 ("fill_mask(R2d_WHOLE, WIN_PAINT, WHITE);")
  39.         )
  40.         (
  41.         :from                   (menu_edit_mask "Clear frame")
  42.         :when                   (Notify )
  43.         :to                     (menu_edit_mask "Clear frame")
  44.         :function_type          ExecuteCode
  45.         :arg_type               (:string)
  46.         :action                 ("fill_mask(R2d_WHOLE, WIN_PAINT, BLACK);")
  47.         )
  48.         (
  49.         :from                   (menu_edit_mask "Clear whole mask")
  50.         :when                   (Notify )
  51.         :to                     (menu_edit_mask "Clear whole mask")
  52.         :function_type          ExecuteCode
  53.         :arg_type               (:string)
  54.         :action                 ("fill_mask(R3d_WHOLE, WIN_PAINT, BLACK);")
  55.         )
  56.         (
  57.         :from                   (menu_edit_mask "Fill whole mask")
  58.         :when                   (Notify )
  59.         :to                     (menu_edit_mask "Fill whole mask")
  60.         :function_type          ExecuteCode
  61.         :arg_type               (:string)
  62.         :action                 ("fill_mask(R3d_WHOLE, WIN_PAINT, WHITE);")
  63.         )
  64.         (
  65.         :from                   (menu_edit_mask "Cut")
  66.         :when                   (Notify )
  67.         :to                     (menu_edit_mask "Cut")
  68.         :function_type          ExecuteCode
  69.         :arg_type               (:string)
  70.         :action                 ("copy_mask(win[WIN_PAINT].m_data[0], bm,
  71.     m[segal.e_m].bit_key, bm_key[win[WIN_PAINT].aspect + 3],
  72.     win[WIN_PAINT].img_size);
  73. fill_mask(R2d_WHOLE, WIN_PAINT, BLACK);")
  74.         )
  75.         (
  76.         :from                   (menu_edit_mask "Invert frame")
  77.         :when                   (Notify )
  78.         :to                     (menu_edit_mask "Invert frame")
  79.         :function_type          ExecuteCode
  80.         :arg_type               (:string)
  81.         :action                 ("fill_mask(R2d_WHOLE, WIN_PAINT, INVERT);")
  82.         )
  83.         (
  84.         :from                   (menu_edit_mask "Invert whole mask")
  85.         :when                   (Notify )
  86.         :to                     (menu_edit_mask "Invert whole mask")
  87.         :function_type          ExecuteCode
  88.         :arg_type               (:string)
  89.         :action                 ("fill_mask(R3d_WHOLE, WIN_PAINT, INVERT);")
  90.         )
  91.         (
  92.         :from                   (menu_edit_mask "Undo")
  93.         :when                   (Notify )
  94.         :to                     (menu_edit_mask "Undo")
  95.         :function_type          ExecuteCode
  96.         :arg_type               (:string)
  97.         :action                 ("load_mask_undo_2d(WIN_PAINT);")
  98.         )
  99.         (
  100.         :from                   (menu_edit_mask "Paste")
  101.         :when                   (Notify )
  102.         :to                     (menu_edit_mask "Paste")
  103.         :function_type          ExecuteCode
  104.         :arg_type               (:string)
  105.         :action                 ("copy_mask(bm, win[WIN_PAINT].m_data[0],
  106.     bm_key[win[WIN_PAINT].aspect + 3], m[segal.e_m].bit_key,
  107.     win[WIN_PAINT].img_size);
  108. m[segal.e_m].changed_frame = TRUE;
  109. save_mask_frame(WIN_PAINT);
  110. redisplay_paint();")
  111.         )
  112.     )
  113. )
  114. (
  115.     :type                   :menu
  116.     :name                   menu_edit_image
  117.     :help                   ""
  118.     :columns                1
  119.     :menu-type              :command
  120.     :menu-handler           nil
  121.     :menu-title             "Edit image"
  122.     :menu-item-labels       ("Undo - Frame" "Original - Frame" )
  123.     :menu-item-label-types  (:string :string )
  124.     :menu-item-states       (:active :active )
  125.     :menu-item-defaults     (nil nil )
  126.     :initial-selections     (nil nil )
  127.     :menu-item-handlers     (nil nil )
  128.     :menu-item-menus        (nil nil )
  129.     :menu-item-colors       ("" "" )
  130.     :pinnable               t
  131.     :user-data              ()
  132.     :actions                (
  133.         (
  134.         :from                   (menu_edit_image "Original - Frame")
  135.         :when                   (Notify )
  136.         :to                     (menu_edit_image "Original - Frame")
  137.         :function_type          ExecuteCode
  138.         :arg_type               (:string)
  139.         :action                 ("load_image_orig(WIN_PAINT);
  140. redisplay_all();")
  141.         )
  142.         (
  143.         :from                   (menu_edit_image "Undo - Frame")
  144.         :when                   (Notify )
  145.         :to                     (menu_edit_image "Undo - Frame")
  146.         :function_type          ExecuteCode
  147.         :arg_type               (:string)
  148.         :action                 ("load_image_undo(WIN_PAINT);
  149. redisplay_all();")
  150.         )
  151.     )
  152. )
  153. (
  154.     :type                   :menu
  155.     :name                   menu_edit
  156.     :help                   ""
  157.     :columns                1
  158.     :menu-type              :command
  159.     :menu-handler           nil
  160.     :menu-title             ""
  161.     :menu-item-labels       ("Mask" "Image" )
  162.     :menu-item-label-types  (:string :string )
  163.     :menu-item-states       (:active :active )
  164.     :menu-item-defaults     (nil nil )
  165.     :initial-selections     (nil nil )
  166.     :menu-item-handlers     (nil nil )
  167.     :menu-item-menus        (menu_edit_mask menu_edit_image )
  168.     :menu-item-colors       ("" "" )
  169.     :pinnable               nil
  170.     :user-data              ()
  171.     :actions                ()
  172. )
  173. (
  174.     :type                   :menu
  175.     :name                   menu_apply_log
  176.     :help                   ""
  177.     :columns                1
  178.     :menu-type              :command
  179.     :menu-handler           nil
  180.     :menu-title             ""
  181.     :menu-item-labels       ("This frame" "Whole image" )
  182.     :menu-item-label-types  (:string :string )
  183.     :menu-item-states       (:active :active )
  184.     :menu-item-defaults     (nil nil )
  185.     :initial-selections     (nil nil )
  186.     :menu-item-handlers     (nil nil )
  187.     :menu-item-menus        (nil nil )
  188.     :menu-item-colors       ("" "" )
  189.     :pinnable               nil
  190.     :user-data              ()
  191.     :actions                (
  192.         (
  193.         :from                   (menu_apply_log "This frame")
  194.         :when                   (Notify )
  195.         :to                     (menu_apply_log "This frame")
  196.         :function_type          ExecuteCode
  197.         :arg_type               (:string)
  198.         :action                 ("apply_log(R2d_WHOLE);")
  199.         )
  200.         (
  201.         :from                   (menu_apply_log "Whole image")
  202.         :when                   (Notify )
  203.         :to                     (menu_apply_log "Whole image")
  204.         :function_type          ExecuteCode
  205.         :arg_type               (:string)
  206.         :action                 ("apply_log(R3d_WHOLE);")
  207.         )
  208.     )
  209. )
  210. (
  211.     :type                   :base-window
  212.     :name                   win_paint
  213.     :owner                  win
  214.     :width                  230
  215.     :height                 57
  216.     :background-color       ""
  217.     :foreground-color       ""
  218.     :label                  "Segal: Paint"
  219.     :label-type             :string
  220.     :initial-state          :invisible
  221.     :show-footer            nil
  222.     :resizable              t
  223.     :icon-file              "icon/paint.xv.icon"
  224.     :icon-label             ""
  225.     :icon-mask-file         ""
  226.     :event-handler          nil
  227.     :user-data              ()
  228.     :actions                ()
  229. )
  230. (
  231.     :type                   :control-area
  232.     :name                   controls1
  233.     :owner                  win_paint
  234.     :help                   ""
  235.     :x                      0
  236.     :y                      0
  237.     :width                  230
  238.     :height                 57
  239.     :background-color       ""
  240.     :foreground-color       ""
  241.     :initial-state          :visible
  242.     :show-border            nil
  243.     :menu                   nil
  244.     :event-handler          nil
  245.     :user-data              ()
  246.     :actions                ()
  247. )
  248. (
  249.     :type                   :message
  250.     :name                   msg_mask
  251.     :owner                  controls1
  252.     :help                   ""
  253.     :x                      8
  254.     :y                      12
  255.     :width                  94
  256.     :height                 13
  257.     :foreground-color       ""
  258.     :label                  "Mask: <None>"
  259.     :label-type             :string
  260.     :label-bold             t
  261.     :initial-state          :active
  262.     :event-handler          nil
  263.     :user-data              ()
  264.     :actions                ()
  265. )
  266. (
  267.     :type                   :button
  268.     :name                   but_brush
  269.     :owner                  controls1
  270.     :help                   ""
  271.     :x                      8
  272.     :y                      32
  273.     :width                  65
  274.     :height                 19
  275.     :constant-width         nil
  276.     :button-type            :normal
  277.     :foreground-color       ""
  278.     :label                  "Brush ..."
  279.     :label-type             :string
  280.     :initial-state          :active
  281.     :menu                   menu_brush
  282.     :notify-handler         nil
  283.     :event-handler          nil
  284.     :user-data              ()
  285.     :actions                (
  286.         (
  287.         :from                   (win_paint but_brush)
  288.         :when                   (Notify )
  289.         :to                     (pop_brush)
  290.         :function_type          :user_defined
  291.         :arg_type               ()
  292.         :action                 (Show)
  293.         )
  294.     )
  295. )
  296. (
  297.     :type                   :button
  298.     :name                   but_edit
  299.     :owner                  controls1
  300.     :help                   ""
  301.     :x                      78
  302.     :y                      32
  303.     :width                  56
  304.     :height                 19
  305.     :constant-width         nil
  306.     :button-type            :normal
  307.     :foreground-color       ""
  308.     :label                  "Edit"
  309.     :label-type             :string
  310.     :initial-state          :active
  311.     :menu                   menu_edit
  312.     :notify-handler         nil
  313.     :event-handler          nil
  314.     :user-data              ()
  315.     :actions                ()
  316. )
  317. (
  318.     :type                   :button
  319.     :name                   but_apply_log
  320.     :owner                  controls1
  321.     :help                   ""
  322.     :x                      138
  323.     :y                      32
  324.     :width                  89
  325.     :height                 19
  326.     :constant-width         nil
  327.     :button-type            :normal
  328.     :foreground-color       ""
  329.     :label                  "Apply log"
  330.     :label-type             :string
  331.     :initial-state          :active
  332.     :menu                   menu_apply_log
  333.     :notify-handler         nil
  334.     :event-handler          nil
  335.     :user-data              ()
  336.     :actions                ()
  337. )
  338. (
  339.     :type                   :setting
  340.     :name                   set_aspect
  341.     :owner                  controls1
  342.     :help                   ""
  343.     :x                      20
  344.     :y                      60
  345.     :width                  129
  346.     :height                 23
  347.     :value-x                77
  348.     :value-y                60
  349.     :rows                   1
  350.     :columns                0
  351.     :layout-type            :horizontal
  352.     :foreground-color       ""
  353.     :setting-type           :stack
  354.     :selection-required     t
  355.     :label                  "Aspect:"
  356.     :label-type             :string
  357.     :notify-handler         nil
  358.     :event-handler          nil
  359.     :choices                ("X axis" "Y axis" "Z axis" )
  360.     :choice-label-types     (:string :string :string )
  361.     :choice-colors          ("" "" "" )
  362.     :choice-defaults        (nil nil t )
  363.     :initial-selections     (nil nil t )
  364.     :initial-state          :invisible
  365.     :user-data              ()
  366.     :actions                (
  367.         (
  368.         :from                   (win_paint set_aspect)
  369.         :when                   (Notify )
  370.         :to                     (win_paint set_aspect)
  371.         :function_type          ExecuteCode
  372.         :arg_type               (:string)
  373.         :action                 ("win[WIN_PAINT].aspect = value;
  374. win[WIN_PAINT].f = win[value].f;
  375. paint_setup();
  376. realloc_window_buffers(WIN_PAINT);
  377. realloc_window_ximage(WIN_PAINT);
  378. redisplay_paint();
  379. ")
  380.         )
  381.     )
  382. )
  383. (
  384.     :type                   :setting
  385.     :name                   set_zoom_mag
  386.     :owner                  controls1
  387.     :help                   ""
  388.     :x                      28
  389.     :y                      84
  390.     :width                  103
  391.     :height                 23
  392.     :value-x                76
  393.     :value-y                84
  394.     :rows                   1
  395.     :columns                0
  396.     :layout-type            :horizontal
  397.     :foreground-color       ""
  398.     :setting-type           :stack
  399.     :selection-required     t
  400.     :label                  "Zoom:"
  401.     :label-type             :string
  402.     :notify-handler         nil
  403.     :event-handler          nil
  404.     :choices                ("x 1" "x 2" "x 3" "x 4" "x 5" "x 6" )
  405.     :choice-label-types     (:string :string :string :string :string :string )
  406.     :choice-colors          ("" "" "" "" "" "" )
  407.     :choice-defaults        (t nil nil nil nil nil )
  408.     :initial-selections     (t nil nil nil nil nil )
  409.     :initial-state          :invisible
  410.     :user-data              ()
  411.     :actions                (
  412.         (
  413.         :from                   (win_paint set_zoom_mag)
  414.         :when                   (Notify )
  415.         :to                     (win_paint set_zoom_mag)
  416.         :function_type          ExecuteCode
  417.         :arg_type               (:string)
  418.         :action                 ("win[WIN_PAINT].zoom_mag = value + 1;
  419. paint_setup();
  420. realloc_window_ximage(WIN_PAINT);
  421. redisplay_paint();")
  422.         )
  423.     )
  424. )
  425. (
  426.     :type                   :slider
  427.     :name                   set_paint_frame
  428.     :owner                  controls1
  429.     :help                   ""
  430.     :x                      24
  431.     :y                      112
  432.     :width                  119
  433.     :height                 94
  434.     :value-x                72
  435.     :value-y                112
  436.     :slider-width           40
  437.     :ticks                  0
  438.     :foreground-color       ""
  439.     :label                  "Frame:"
  440.     :label-type             :string
  441.     :layout-type            :horizontal
  442.     :orientation            :vertical
  443.     :show-endboxes          nil
  444.     :show-range             t
  445.     :show-value             t
  446.     :min-value              0
  447.     :max-value              256
  448.     :min-value-string       ""
  449.     :max-value-string       ""
  450.     :min-tick-string        ""
  451.     :max-tick-string        ""
  452.     :initial-value          0
  453.     :initial-state          :invisible
  454.     :notify-handler         nil
  455.     :event-handler          nil
  456.     :user-data              ()
  457.     :actions                (
  458.         (
  459.         :from                   (win_paint set_paint_frame)
  460.         :when                   (Notify )
  461.         :to                     (win_paint set_paint_frame)
  462.         :function_type          ExecuteCode
  463.         :arg_type               (:string)
  464.         :action                 ("win[WIN_PAINT].f = value;
  465. win[WIN_PAINT].repaint = TRUE;
  466. redisplay_paint();
  467.  
  468. save_image_orig(WIN_PAINT);
  469.  
  470. if(xv_get(Threshold_pop_threshold->pop_threshold,
  471.         XV_SHOW, NULL)
  472. && (threshold.roi == R2d_WHOLE
  473. || threshold.roi == R2d_CROP
  474. || threshold.roi == R2d_PT_LIST)) refresh_histogram();
  475. ")
  476.         )
  477.     )
  478. )
  479. (
  480.     :type                   :canvas-pane
  481.     :name                   canvas
  482.     :owner                  win_paint
  483.     :help                   ""
  484.     :x                      24
  485.     :y                      133
  486.     :width                  93
  487.     :height                 1
  488.     :background-color       ""
  489.     :foreground-color       ""
  490.     :initial-state          :invisible
  491.     :draggable              nil
  492.     :droppable              nil
  493.     :default-drop-site      nil
  494.     :menu                   nil
  495.     :horizontal-scrollbar   nil
  496.     :scrollable-width       93
  497.     :vertical-scrollbar     nil
  498.     :scrollable-height      1
  499.     :repaint-proc           nil
  500.     :event-handler          nil
  501.     :drawing-model          :xview
  502.     :user-data              ()
  503.     :actions                (
  504.         (
  505.         :from                   (win_paint canvas)
  506.         :when                   (Repaint )
  507.         :to                     (win_paint canvas)
  508.         :function_type          ExecuteCode
  509.         :arg_type               (:string)
  510.         :action                 ("win[WIN_PAINT].repaint = TRUE;
  511. map_buffers();")
  512.         )
  513.         (
  514.         :from                   (win_paint canvas)
  515.         :when                   (AnyEvent )
  516.         :to                     (win_paint canvas)
  517.         :function_type          ExecuteCode
  518.         :arg_type               (:string)
  519.         :action                 ("paint_event(event);")
  520.         )
  521.     )
  522. )
  523. (
  524.     :type                   :popup-window
  525.     :name                   pop_brush
  526.     :owner                  win_paint
  527.     :width                  405
  528.     :height                 151
  529.     :background-color       ""
  530.     :foreground-color       ""
  531.     :label                  "Segal: Paintbrush"
  532.     :label-type             :string
  533.     :initial-state          :invisible
  534.     :show-footer            nil
  535.     :resizable              nil
  536.     :pinned                 t
  537.     :done-handler           nil
  538.     :event-handler          nil
  539.     :user-data              ()
  540.     :actions                ()
  541. )
  542. (
  543.     :type                   :control-area
  544.     :name                   controls2
  545.     :owner                  pop_brush
  546.     :help                   ""
  547.     :x                      0
  548.     :y                      0
  549.     :width                  405
  550.     :height                 151
  551.     :background-color       ""
  552.     :foreground-color       ""
  553.     :initial-state          :visible
  554.     :show-border            nil
  555.     :menu                   nil
  556.     :event-handler          nil
  557.     :user-data              ()
  558.     :actions                ()
  559. )
  560. (
  561.     :type                   :setting
  562.     :name                   set_mode
  563.     :owner                  controls2
  564.     :help                   ""
  565.     :x                      20
  566.     :y                      16
  567.     :width                  201
  568.     :height                 23
  569.     :value-x                67
  570.     :value-y                16
  571.     :rows                   1
  572.     :columns                0
  573.     :layout-type            :horizontal
  574.     :foreground-color       ""
  575.     :setting-type           :exclusive
  576.     :selection-required     t
  577.     :label                  "Mode:"
  578.     :label-type             :string
  579.     :notify-handler         nil
  580.     :event-handler          nil
  581.     :choices                ("Mask" "Image" "Points" )
  582.     :choice-label-types     (:string :string :string )
  583.     :choice-colors          ("" "" "" )
  584.     :initial-selections     (t nil nil )
  585.     :initial-state          :active
  586.     :user-data              ()
  587.     :actions                (
  588.         (
  589.         :from                   (pop_brush set_mode "Mask")
  590.         :when                   (Notify )
  591.         :to                     (pop_brush set_mode "Mask")
  592.         :function_type          ExecuteCode
  593.         :arg_type               (:string)
  594.         :action                 ("brush.mode = BRUSH_MASK;
  595. xv_set(Paint_pop_brush->set_affect_image,
  596.     XV_SHOW, FALSE,
  597.     NULL);
  598. xv_set(Paint_pop_brush->set_degree,
  599.     XV_SHOW, FALSE,
  600.     NULL);
  601. xv_set(Paint_pop_brush->set_affect_mask,
  602.     XV_SHOW, TRUE,
  603.     NULL);")
  604.         )
  605.         (
  606.         :from                   (pop_brush set_mode "Image")
  607.         :when                   (Notify )
  608.         :to                     (pop_brush set_mode "Image")
  609.         :function_type          ExecuteCode
  610.         :arg_type               (:string)
  611.         :action                 ("brush.mode = BRUSH_IMAGE;
  612. xv_set(Paint_pop_brush->set_affect_mask,
  613.     XV_SHOW, FALSE,
  614.     NULL);
  615. xv_set(Paint_pop_brush->set_affect_image,
  616.     XV_SHOW, TRUE,
  617.     NULL);
  618. xv_set(Paint_pop_brush->set_degree,
  619.     XV_SHOW, TRUE,
  620.     NULL);
  621. ")
  622.         )
  623.         (
  624.         :from                   (pop_brush set_mode "Points")
  625.         :when                   (Notify )
  626.         :to                     (pop_brush set_mode "Points")
  627.         :function_type          ExecuteCode
  628.         :arg_type               (:string)
  629.         :action                 ("brush.mode = BRUSH_PTS;
  630. xv_set(Paint_pop_brush->set_affect_image,
  631.     XV_SHOW, FALSE,
  632.     NULL);
  633. xv_set(Paint_pop_brush->set_degree,
  634.     XV_SHOW, FALSE,
  635.     NULL);
  636. xv_set(Paint_pop_brush->set_affect_mask,
  637.     XV_SHOW, TRUE,
  638.     NULL);")
  639.         )
  640.     )
  641. )
  642. (
  643.     :type                   :setting
  644.     :name                   set_affect_mask
  645.     :owner                  controls2
  646.     :help                   ""
  647.     :x                      15
  648.     :y                      44
  649.     :width                  148
  650.     :height                 23
  651.     :value-x                67
  652.     :value-y                44
  653.     :rows                   1
  654.     :columns                0
  655.     :layout-type            :horizontal
  656.     :foreground-color       ""
  657.     :setting-type           :exclusive
  658.     :selection-required     t
  659.     :label                  "Affect:"
  660.     :label-type             :string
  661.     :notify-handler         nil
  662.     :event-handler          nil
  663.     :choices                ("Paint" "Erase" )
  664.     :choice-label-types     (:string :string )
  665.     :choice-colors          ("" "" )
  666.     :initial-selections     (nil nil )
  667.     :initial-state          :active
  668.     :user-data              ()
  669.     :actions                (
  670.         (
  671.         :from                   (pop_brush set_affect_mask "Erase")
  672.         :when                   (Notify )
  673.         :to                     (pop_brush set_affect_mask "Erase")
  674.         :function_type          ExecuteCode
  675.         :arg_type               (:string)
  676.         :action                 ("brush.mask_affect = MASK_ERASE;
  677. change_cursor_proc();")
  678.         )
  679.         (
  680.         :from                   (pop_brush set_affect_mask "Paint")
  681.         :when                   (Notify )
  682.         :to                     (pop_brush set_affect_mask "Paint")
  683.         :function_type          ExecuteCode
  684.         :arg_type               (:string)
  685.         :action                 ("brush.mask_affect = MASK_PAINT;
  686. change_cursor_proc();")
  687.         )
  688.     )
  689. )
  690. (
  691.     :type                   :setting
  692.     :name                   set_affect_image
  693.     :owner                  controls2
  694.     :help                   ""
  695.     :x                      15
  696.     :y                      44
  697.     :width                  166
  698.     :height                 23
  699.     :value-x                67
  700.     :value-y                44
  701.     :rows                   1
  702.     :columns                0
  703.     :layout-type            :horizontal
  704.     :foreground-color       ""
  705.     :setting-type           :exclusive
  706.     :selection-required     t
  707.     :label                  "Affect:"
  708.     :label-type             :string
  709.     :notify-handler         nil
  710.     :event-handler          nil
  711.     :choices                ("Darker" "Lighter" )
  712.     :choice-label-types     (:string :string )
  713.     :choice-colors          ("" "" )
  714.     :initial-selections     (nil nil )
  715.     :initial-state          :invisible
  716.     :user-data              ()
  717.     :actions                (
  718.         (
  719.         :from                   (pop_brush set_affect_image "Lighter")
  720.         :when                   (Notify )
  721.         :to                     (pop_brush set_affect_image "Lighter")
  722.         :function_type          ExecuteCode
  723.         :arg_type               (:string)
  724.         :action                 ("brush.image_affect = brush.degree;
  725. ")
  726.         )
  727.         (
  728.         :from                   (pop_brush set_affect_image "Darker")
  729.         :when                   (Notify )
  730.         :to                     (pop_brush set_affect_image "Darker")
  731.         :function_type          ExecuteCode
  732.         :arg_type               (:string)
  733.         :action                 ("brush.image_affect = -1 * brush.degree;
  734. ")
  735.         )
  736.     )
  737. )
  738. (
  739.     :type                   :setting
  740.     :name                   set_degree
  741.     :owner                  controls2
  742.     :help                   ""
  743.     :x                      186
  744.     :y                      44
  745.     :width                  212
  746.     :height                 23
  747.     :value-x                214
  748.     :value-y                44
  749.     :rows                   1
  750.     :columns                0
  751.     :layout-type            :horizontal
  752.     :foreground-color       ""
  753.     :setting-type           :exclusive
  754.     :selection-required     t
  755.     :label                  "by:"
  756.     :label-type             :string
  757.     :notify-handler         nil
  758.     :event-handler          nil
  759.     :choices                ("2" "5" "10" "20" "50" "100" )
  760.     :choice-label-types     (:string :string :string :string :string :string )
  761.     :choice-colors          ("" "" "" "" "" "" )
  762.     :initial-selections     (nil nil nil t nil nil )
  763.     :initial-state          :invisible
  764.     :user-data              ()
  765.     :actions                (
  766.         (
  767.         :from                   (pop_brush set_degree "10")
  768.         :when                   (Notify )
  769.         :to                     (pop_brush set_degree "10")
  770.         :function_type          ExecuteCode
  771.         :arg_type               (:string)
  772.         :action                 ("brush.degree = 10;
  773. ")
  774.         )
  775.         (
  776.         :from                   (pop_brush set_degree "100")
  777.         :when                   (Notify )
  778.         :to                     (pop_brush set_degree "100")
  779.         :function_type          ExecuteCode
  780.         :arg_type               (:string)
  781.         :action                 ("brush.degree = 100;
  782. ")
  783.         )
  784.         (
  785.         :from                   (pop_brush set_degree "2")
  786.         :when                   (Notify )
  787.         :to                     (pop_brush set_degree "2")
  788.         :function_type          ExecuteCode
  789.         :arg_type               (:string)
  790.         :action                 ("brush.degree = 2;
  791. ")
  792.         )
  793.         (
  794.         :from                   (pop_brush set_degree "20")
  795.         :when                   (Notify )
  796.         :to                     (pop_brush set_degree "20")
  797.         :function_type          ExecuteCode
  798.         :arg_type               (:string)
  799.         :action                 ("brush.degree = 20;
  800. ")
  801.         )
  802.         (
  803.         :from                   (pop_brush set_degree "5")
  804.         :when                   (Notify )
  805.         :to                     (pop_brush set_degree "5")
  806.         :function_type          ExecuteCode
  807.         :arg_type               (:string)
  808.         :action                 ("brush.degree = 5;
  809. ")
  810.         )
  811.         (
  812.         :from                   (pop_brush set_degree "50")
  813.         :when                   (Notify )
  814.         :to                     (pop_brush set_degree "50")
  815.         :function_type          ExecuteCode
  816.         :arg_type               (:string)
  817.         :action                 ("brush.degree = 50;
  818. ")
  819.         )
  820.     )
  821. )
  822. (
  823.     :type                   :setting
  824.     :name                   set_shape
  825.     :owner                  controls2
  826.     :help                   ""
  827.     :x                      14
  828.     :y                      70
  829.     :width                  165
  830.     :height                 23
  831.     :value-x                67
  832.     :value-y                70
  833.     :rows                   1
  834.     :columns                0
  835.     :layout-type            :horizontal
  836.     :foreground-color       ""
  837.     :setting-type           :exclusive
  838.     :selection-required     t
  839.     :label                  "Shape:"
  840.     :label-type             :string
  841.     :notify-handler         nil
  842.     :event-handler          nil
  843.     :choices                ("Square" "Round" )
  844.     :choice-label-types     (:string :string )
  845.     :choice-colors          ("" "" )
  846.     :initial-selections     (nil nil )
  847.     :initial-state          :active
  848.     :user-data              ()
  849.     :actions                (
  850.         (
  851.         :from                   (pop_brush set_shape "Round")
  852.         :when                   (Notify )
  853.         :to                     (pop_brush set_shape "Round")
  854.         :function_type          ExecuteCode
  855.         :arg_type               (:string)
  856.         :action                 ("brush.shape = BRUSH_ROUND;
  857. change_cursor_proc();")
  858.         )
  859.         (
  860.         :from                   (pop_brush set_shape "Square")
  861.         :when                   (Notify )
  862.         :to                     (pop_brush set_shape "Square")
  863.         :function_type          ExecuteCode
  864.         :arg_type               (:string)
  865.         :action                 ("brush.shape = BRUSH_SQUARE;
  866. change_cursor_proc();")
  867.         )
  868.     )
  869. )
  870. (
  871.     :type                   :setting
  872.     :name                   set_size
  873.     :owner                  controls2
  874.     :help                   ""
  875.     :x                      28
  876.     :y                      97
  877.     :width                  344
  878.     :height                 23
  879.     :value-x                67
  880.     :value-y                97
  881.     :rows                   1
  882.     :columns                0
  883.     :layout-type            :horizontal
  884.     :foreground-color       ""
  885.     :setting-type           :exclusive
  886.     :selection-required     t
  887.     :label                  "Size:"
  888.     :label-type             :string
  889.     :notify-handler         nil
  890.     :event-handler          nil
  891.     :choices                ("1x1" "2x2" "3x3" "4x4" "5x5" "10x10" "20x20" )
  892.     :choice-label-types     (:string :string :string :string :string :string :string )
  893.     :choice-colors          ("" "" "" "" "" "" "" )
  894.     :initial-selections     (nil t nil nil nil nil nil )
  895.     :initial-state          :active
  896.     :user-data              ()
  897.     :actions                (
  898.         (
  899.         :from                   (pop_brush set_size)
  900.         :when                   (Notify )
  901.         :to                     (pop_brush set_size)
  902.         :function_type          ExecuteCode
  903.         :arg_type               (:string)
  904.         :action                 ("brush.size = value;
  905. change_cursor_proc();")
  906.         )
  907.     )
  908. )
  909. (
  910.     :type                   :button
  911.     :name                   but_close
  912.     :owner                  controls2
  913.     :help                   ""
  914.     :x                      348
  915.     :y                      128
  916.     :width                  51
  917.     :height                 19
  918.     :constant-width         nil
  919.     :button-type            :normal
  920.     :foreground-color       ""
  921.     :label                  "Close"
  922.     :label-type             :string
  923.     :initial-state          :active
  924.     :menu                   nil
  925.     :notify-handler         nil
  926.     :event-handler          nil
  927.     :user-data              ()
  928.     :actions                (
  929.         (
  930.         :from                   (pop_brush but_close)
  931.         :when                   (Notify )
  932.         :to                     (pop_brush)
  933.         :function_type          :user_defined
  934.         :arg_type               ()
  935.         :action                 (Hide)
  936.         )
  937.     )
  938. )
  939. )
  940.